package com.wuchao.spring.aopPlus;

import com.wuchao.entity.User;
import com.wuchao.spring.aop.PointCut;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author wuchao66
 * @Date 2022/7/4 10:05
 * @Version 1.0
 */
public class Test1 {
     @Test
    public void showAop(){//构造不主推
        ClassPathXmlApplicationContext cpac =
                new ClassPathXmlApplicationContext("ApplicationContext.xml");//拿到spring的配置文件
         AopConstruor AopConstruor=   (AopConstruor)cpac.getBean("AopConstruor");
         AopConstruor.show();
    }
    @Test
    public void showAopP(){//p不主推
        ClassPathXmlApplicationContext cpac =
                new ClassPathXmlApplicationContext("ApplicationContext.xml");//拿到spring的配置文件
        AopConstruorP AopConstruorP=   (AopConstruorP)cpac.getBean("AopConstruorP");
        AopConstruorP.show();
    }
    @Test
    public void showAopPlis(){//多值入参
        ClassPathXmlApplicationContext cpac =
                new ClassPathXmlApplicationContext("ApplicationContext.xml");//拿到spring的配置文件
        IocPlus iocPlus=   (IocPlus)cpac.getBean("IocPlus");
        iocPlus.show();
    }
}
